#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1;
const int M = 1e9 + 7;

ll n;

int main()
{
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    while (cin >> n) {
        int res = 0;
        while ((1ll << res) <= n) {
            res++;
        }

        cout << res-1 << endl;
    }
        
    return 0;
}